/**
 * @Author: 肖科
 * @Date: 2019/11/25
 * @Last Modified by:   肖科
 * @Last Modified time: 2019-11-25 09:45:00
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';


//  查询工时
export const labourPrice = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedataRepairtypes/labourpriceItem`, {
  params
});

//  查询维修项目
export const projectinfoservice = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/serviceProject/queryProjectInfo`, {
  params
});

//  查询配件
export const partinfoservice = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/serviceProject/queryPartInfo`, {
  params
});

// 查询服务产品维护页面数据
export const queryServiceProducts = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/serviceProject/maintain`, {
  params
});

// 维护产品新增,编辑保存
export const maintainSave = params => axios.post(`${SERVER.DMSCLOUD_REPAIR}/serviceProject/serviceSave`, params);

// 根据服务产品ID查询项目
export const queryServiceProject = id => axios.get(`${SERVER.DMSCLOUD_REPAIR}/serviceProject/getProject/${id}`, {});

// 根据服务产品ID查询配件
export const queryServicePart = id => axios.get(`${SERVER.DMSCLOUD_REPAIR}/serviceProject/getPart/${id}`, {});

// 服务产品导出
export const getExcelList = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/serviceProject/export`, {
  params,
  responseType: 'arraybuffer'
});
